Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest data point not plotted after a disconnect #2727

Conversation

rjwills28
Copy link
Contributor

An issue was introduced in #2713 where we attempted to show PV disconnections in the data browser. In the current implementation we attempt to detect a 'disconnect' messages in the metadata of a data item and add an extra data point to signal this. On the following next() call to the iterator it uses the previous message (which was just replaced with the disconnect) to make sure no data is missed.

It turns out there is a particular case that causes a problem when it is the final message from the archiver that contains the disconnect. What this means is that now the next() function never gets called as the iterator is empty (so hasNext() returns false) and so we can miss the following (i.e. latest) value. This means that the value after the last disconnect does not get plotted.

This PR contains a fix for this where I have updated the hasNext() method of the iterator to return true if we still need to process the most recent message (meaning that next() will be called one final time).

rjwills28 and others added 2 commits October 24, 2023 14:29
If a disconnect is detected in the last message then the
next() function never gets called to save the latest data
point and so it does not get plotted.
@rjwills28
Copy link
Contributor Author

Hi @shroffk, would you mind taking a look at this PR if you have a moment?

@shroffk shroffk merged commit 2d7b472 into ControlSystemStudio:master Apr 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants